#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<assert.h>
void* my_memcpy(void* dest, void* src, size_t num)
{
	void* ret = dest;
	assert(dest && src);
	while (num--) {
		*(char*)dest = *(char*)src;
		dest = (char*)dest + 1;
		src = (char*)src + 1;
	}
	return ret;
}
int main()
{
	char arr1[20] = "abcdefg";
	char arr2[20] = "rhmotyi";
	my_memcpy(arr1, arr2, 3);
	printf("%s\n", arr1);
	return 0;
}